package com.acminds.fotoporter.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the ROLE database table.
 * 
 */
@Entity
@Table(name="ROLE")
public class Role extends com.acminds.fotoporter.persistence.BaseDTO implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="ROLE_ID")
	private int roleId;

	@Column(name="DESCRIPTION")
	private String description;

	@Column(name="ROLE_NAME")
	private String roleName;

	//bi-directional many-to-many association to Privilege
	@ManyToMany(mappedBy="roles")
	private List<Privilege> privileges;

	//bi-directional many-to-one association to UserInfo
	@OneToMany(mappedBy="role")
	private List<UserInfo> userInfos;

    public Role() {
    }

	public int getRoleId() {
		return this.roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getRoleName() {
		return this.roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public List<Privilege> getPrivileges() {
		return this.privileges;
	}

	public void setPrivileges(List<Privilege> privileges) {
		this.privileges = privileges;
	}
	
	public List<UserInfo> getUserInfos() {
		return this.userInfos;
	}

	public void setUserInfos(List<UserInfo> userInfos) {
		this.userInfos = userInfos;
	}
	
}